<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		#form{
			width: 230px;
		}
	</style>
</head>
<body>
	<form action="#" id="form">
		姓名：<input type="text" name="name">
		密码：<input type="text" name="password">
		邮箱：<input type="text" name="email">
		<input type="button" value="提交">
	</form>

	<table width="400" border="3" cellpadding="10"> 
		<!-- <caption></caption> -->
		<thead>
			<tr>
				<th>姓名</th>
				<th>密码</th>
				<th>邮箱</th>
			</tr>
		</thead>
		<tfoot></tfoot>
		<tbody>
			<tr align="center">
				<td></td>
				<td></td>
				<td></td>
			</tr>
		</tbody>
	</table>	
	<script>
		var inps=document.querySelectorAll('input');
		var form=document.querySelector('form');
		var tds=document.querySelectorAll('td');
		var submit=inps[3];
		submit.onclick=function() {
			tds[0].innerText=form.name.value;
			tds[2].innerText=form.email.value;
			tds[1].innerText=form.password.value;
		}
	</script>
</body>
</html>